package o;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import com.huawei.secure.android.common.intent.SafeBroadcastReceiver;
import huawei.widget.HwBottomNavigationView;

public class dji {
    private ckm ˊ;
    private Context ˋ;
    private BroadcastReceiver ˎ = new SafeBroadcastReceiver(this) {
        final /* synthetic */ dji ॱ;

        {
            this.ॱ = r1;
        }

        public void onReceiveMsg(Context context, Intent intent) {
            boolean z = false;
            if (dji.ˊ().equals(intent.getAction())) {
                Bundle extras = intent.getExtras();
                if (extras != null && (this.ॱ.ˋ instanceof Activity)) {
                    String string = extras.getString("tab_id");
                    String ˋ = cju.ˋ(this.ॱ.ˊ.ˊ());
                    String ॱ = cju.ॱ(this.ॱ.ˊ.ˊ());
                    if (!dof.ˋ(string)) {
                        if (string.equals(ˋ) || string.equals(ॱ)) {
                            boolean z2 = extras.getBoolean("show_tag", false);
                            if (!((dji.ˎ().equals(string) && djp.ˎ().ˏ()) || (("gss|discovery".equals(string) && djp.ˎ().ʽ()) || ("gss|home".equals(string) && djp.ˎ().ᐝ())))) {
                                z = z2;
                            }
                            this.ॱ.ˊ(z);
                        }
                    }
                }
            }
        }
    };
    private HwBottomNavigationView ॱ;

    public dji(Context context, ckm o_ckm, HwBottomNavigationView hwBottomNavigationView) {
        ᐝ();
        this.ˋ = context;
        this.ˊ = o_ckm;
        this.ॱ = hwBottomNavigationView;
        ˏ();
    }

    private static final String ˊ() {
        return ContentManager.getInstant().getContext().getPackageName() + ".CustomTabItem.redpointshow";
    }

    public static String ˎ() {
        return eqp.ᐝ() ? "customColumn.personcenter" : "custom.personcenter.oversea";
    }

    public static void ˊ(String str, boolean z) {
        Logger.ˏ("CustomTabItem", "sendShowRedPointBroadcast: tabId=" + str + ", needShow=" + z);
        if (!dof.ˋ(str)) {
            Intent intent = new Intent(ˊ());
            Bundle bundle = new Bundle();
            bundle.putString("tab_id", str);
            bundle.putBoolean("show_tag", z);
            intent.putExtras(bundle);
            ll.ˏ(ContentManager.getInstant().getContext()).ˋ(intent);
        }
    }

    private void ˏ() {
        ˊ(this.ˊ.ʼ());
    }

    public void ˊ(boolean z) {
        if (Logger.ˎ()) {
            Logger.ˏ("CustomTabItem", "setRedPointVisiable: showTab=" + z + ", column id=" + this.ˊ.ˊ() + ", column index=" + this.ˊ.ᐝ());
        }
        this.ˊ.ˎ(z);
        if (this.ॱ != null && z != this.ॱ.ˏ(this.ˊ.ᐝ())) {
            this.ॱ.ˏ(this.ˊ.ᐝ(), z);
        }
    }

    private void ᐝ() {
        ll.ˏ(ContentManager.getInstant().getContext()).ˏ(this.ˎ, new IntentFilter(ˊ()));
    }

    public void ॱ() {
        ll.ˏ(ContentManager.getInstant().getContext()).ˋ(this.ˎ);
    }
}
